package iteratorapplication;


// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.20E23A37-9C77-CDD9-1C61-2C5B8511C1F8]
// </editor-fold> 
public class CompteCorrent implements IteratorIf {

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.5A6EE4F3-0132-A30E-BE86-24F48F6BAA67]
    // </editor-fold> 
    private int it;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.91049D04-93AF-7BD0-C185-CEF9E7CAB5BB]
    // </editor-fold> 
    private int index;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.2107AD64-8ACE-FD12-9535-25AB182D2E72]
    // </editor-fold> 
    private String[] titulars;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.916BE1C6-1F18-6D67-F492-6B8A935E07D9]
    // </editor-fold> 
    public CompteCorrent () {
        titulars = new String[5];
        index=0;
        it=0;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.D4848D4F-FEEA-3366-6074-A145BA01C6DC]
    // </editor-fold> 
    public String[] getTitulars () {
        return titulars;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.01D4A41D-AC87-94B8-9974-D9BC7D55A3C1]
    // </editor-fold> 
    public void setTitulars (String[] val) {
        this.titulars = val;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.83EA4E3E-8188-A8C9-D28D-B4F11798CA18]
    // </editor-fold> 
    public void addTitular (String titular) {
        if (index < titulars.length){
        titulars[index]=titular;
        index++;
        }
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.2675BC8B-DD00-9CDE-D149-E2C9490F06DA]
    // </editor-fold> 
    public boolean hasNext () {
        if (it<index){
        return true;
        }
        else {
            it=0;
            return false;
        }

    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.CD7B505A-95E3-EDEB-C571-6437839DE0C0]
    // </editor-fold> 
    public Object next () {
        return titulars[it++];
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.FBC081A4-4465-A30F-5A2B-25E49E4D83FD]
    // </editor-fold> 
    public int getIndex () {
        return index;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.6CECDE92-3332-6DF1-0F3E-6BABD3D45900]
    // </editor-fold> 
    public void setIndex (int val) {
        this.index = val;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.DE6F046E-413D-BA36-F9AC-816458EB21C4]
    // </editor-fold> 
    public int getIt () {
        return it;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.B7EED818-876E-AF0A-4348-552A7AA3FE8B]
    // </editor-fold> 
    public void setIt (int val) {
        this.it = val;
    }

}

